#include <bits/stdc++.h>
using namespace std;

#define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

typedef long long LL;

int n, m;

const int N = 2e5+50;

vector<int> G[N];

int d[N][2], d2[N][2];
inline void add(int u, int v, vector<int> G[])
{
	G[u].push_back(v);
}

int k, a[N];

void bfs(int s, vector<int> G[], int d[N][2])
{

	queue<int> Q;
	Q.push(s);
	d[s][0] = 1;
	d[s][1] = 1;
	while (!Q.empty())
	{
		int now = Q.front(); Q.pop();
		for (int v : G[now])
		{
			if (d[v][0] == 0)
			{
				d[v][0] = d[now][0] + 1;
				d[v][1] = 1;
				Q.push(v);
			} 
			else if (d[v][0] == d[now][0] + 1)
			{
				++d[v][1];
			}
		}
	}

}


int main(int argc, char const *argv[])
{
	scanf("%d%d", &n, &m);
	for (int i=0; i<m; ++i)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		add(v, u, G);
		// add(u, v, G2);
	}
	scanf("%d", &k);
	for (int i=0; i<k; ++i)
		scanf("%d", &a[i]);
	int s = a[0], t = a[k-1];

	int ans = 0, del = 0;
	bfs(t, G, d);
	// bfs(s, G2, d2);
	for (int i=0; i<k-1; ++i)
	{
		int u = a[i], v = a[i+1];
		if (d[v][0] != d[u][0] - 1)
			++ans;
		else if (d[v][0] == d[u][0] - 1 && d[u][1] > 1)
			++del;
		dbg(i, ans, del);
	}

	for (int i=1; i<=n; ++i)
		dbg(i, d[i][0], d[i][1]);
	printf("%d %d\n", ans, ans + del);

	return 0;
}